package functions;

/**
 * Class for function f(x) = sqrt(x)
 * @author Patrick Bauer
 */
public class sqrtX extends AbstractPanel {
    public sqrtX(int colorScheme) {
        super(colorScheme);
        this.setToolTipText("f(x) = sqrt(x) von x = -10.0 bis x = 10.0");
    }

    @Override
    public double getY(double x) {
        if(x < 0)
            return 0;
        
        return Math.sqrt(x);
    }    
   
}
